﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;

namespace S4Store.Domain
{
    public class Information
    {
        public enum InformationType
        {
            [Description("销售")]
            Sale = 1,
            [Description("售后")]
            AfterSale = 2,
            [Description("市场")]
            Marketing = 3
        }

        public int Id { get; set; }
        public int TypeValue { get; set; }
        public DateTime publicdate { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }
        [NotMapped]
        public InformationType Type
        {
            get { return TypeValue.ToEnum<InformationType>(); }
            set { TypeValue = value.ToInt(); }
        }
    }
}
